Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rich-text-editor)!: Rename value to defaultValue #29

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

sentience
Copy link
Member

Why

To conform to React naming convention for form control props.
Uncontrolled form fields take a defaultValue to indicate that
changes to this prop's value will not update the mounted component.
Rather, the component manages its current value as internal state,
and notifies subscribers via onChange when it changes.

https://cultureamp.atlassian.net/browse/SR2-721

What

Consumers will need to update their code to the new prop name. E.g. before:

<RichTextEditor value={}>

and after:

<RichTextEditor defaultValue={}>

@sentience sentience requested a review from a team as a code owner September 12, 2023 04:14
@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2023

🦋 Changeset detected

Latest commit: ae623f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kaizen/rich-text-editor Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Sep 12, 2023

✨ Here is your branch preview! ✨

Last updated for commit ae623f7: chore: Ignore TS build output in eslint check

To conform to React naming convention for form control props.
Uncontrolled form fields take a `defaultValue` to indicate that
changes to this prop's value will not update the mounted component.
Rather, the component manages its current value as internal state,
and notifies subscribers via onChange when it changes.

Consumers will need to update their code to the new prop name. E.g. before:

```jsx
<RichTextEditor value={…}>
```

and after:

```jsx
<RichTextEditor defaultValue={…}>
```
@sentience sentience force-pushed the rich-text-editor-rename-value-prop-to-defaultvalue branch from 2f33c6a to ae623f7 Compare September 12, 2023 04:35
@dougmacknz dougmacknz merged commit c377231 into main Sep 12, 2023
22 checks passed
@dougmacknz dougmacknz deleted the rich-text-editor-rename-value-prop-to-defaultvalue branch September 12, 2023 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants